package com.cdck.safe.dete.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cdck.safe.dete.model.entity.Activity;
import com.cdck.safe.dete.model.query.BaseKeywordsQuery;

import java.util.List;


/**
 * (Activity)表服务接口
 *
 * @author wp
 * @since 2024-02-26 22:57:18
 */
public interface ActivityService extends IService<Activity> {


    /**
     * 分页列表
     *
     * @return
     */
    IPage<Activity> queryByPage(BaseKeywordsQuery queryParams);


    /**
     * 获取表单数据
     *
     * @param id
     * @return
     */
    Activity getActivityFormData(Long id);

    /**
     * 新增数据
     *
     * @param activity Activity对象
     * @return
     */
    boolean saveActivity (Activity activity);

   /**
     * 修改数据
     *
     * @param id   id
     * @paramactivity Activity对象
     * @return
     */
    boolean updateActivity(Long id, Activity activity);

    /**
     * 删除数据
     *
     * @param idsStr id,多个以英文逗号(,)分割
     * @return
     */
    boolean deleteActivitys(String idsStr);

    /**
     * 新增人数
     */
    void addMember(String activityId);

    /**
     * 减去人数
     * @param ids
     */
    void removeMembers(List<Long> ids);
}
